from bokeh.plotting import figure, show
from bokeh.io import output_notebook
from bokeh.layouts import gridplot

# 在 Jupyter Notebook 中显示图表
output_notebook()

# 创建数据
x = [1, 2, 3, 4, 5]
y1 = [6, 7, 2, 4, 5]
y2 = [3, 8, 1, 6, 7]

# 创建第一个图表
p1 = figure(title="Plot 1", x_axis_label='x', y_axis_label='y')
p1.line(x, y1, legend_label="Line 1", line_width=2)

# 创建第二个图表
p2 = figure(title="Plot 2", x_axis_label='x', y_axis_label='y')
p2.circle(x, y2, size=10, color="navy", alpha=0.5)

# 将图表放入网格布局
grid = gridplot([[p1, p2]])

# 显示图表
show(grid)